package com.dong.applicationcontext.event;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.List;

/**
 * description
 *
 * @author Administrator 2021/09/06 20:24
 */
@Configuration
public class AppConfig {

    @Bean
    public BlockedListNotifier blockedListNotifier(){
        return new BlockedListNotifier();
    }

    @Bean
    public MyApplicationEventPublisherAware myApplicationEventPublisherAware(){
        MyApplicationEventPublisherAware publisherAware = new MyApplicationEventPublisherAware();
        List<String> list = new ArrayList<>();
        list.add("127.0.0.1");
        publisherAware.setBlockedList(list);
        return publisherAware;
    }
}
